package com.example.clublesson01.login

import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.bw.kf.lib_base.base.BaseActivity
import com.example.clublesson01.R
import com.example.clublesson01.databinding.ActivityLoginPhoneBinding

@Route(path = "/app/login/LoginPhoneActivity")
class LoginPhoneActivity : BaseActivity<ActivityLoginPhoneBinding, LoginRepo>() {

    override fun iniView() {
        requestPermissions( arrayOf(
            "android.permission.VIBRATE",
            "android.permission.RECORD_AUDIO" ,
            "android.permission.CAMERA",
            "android.permission.ACCESS_NETWORK_STATE",
            "android.permission.WRITE_EXTERNAL_STORAGE" ,
            "android.permission.ACCESS_FINE_LOCATION",
            "android.permission.GET_TASKS" ,
            "android.permission.ACCESS_WIFI_STATE" ,
            "android.permission.CHANGE_WIFI_STATE" ,
            "android.permission.WAKE_LOCK",
            "android.permission.MODIFY_AUDIO_SETTINGS",
            "android.permission.READ_PHONE_STATE",
            "android.permission.RECEIVE_BOOT_COMPLETED",
            "android.permission.FOREGROUND_SERVICE",
            "android.permission.ACCESS_COARSE_LOCATION",
            "android.permission.POST_NOTIFICATIONS"
        ),100)
        binding.ortherLogin.setOnClickListener {
            //ARouter.getInstance().build("/app/login/LoginActivity").navigation()
            ARouter.getInstance().build("/app/login/YzmActivity").navigation()
        }
    }

    override fun iniData() {

    }

    override fun getViewModel(): Class<LoginRepo> {
        return LoginRepo::class.java
    }

    override fun Layoutid(): Int {
        return R.layout.activity_login_phone
    }
}